<template>
<div>
  <van-nav-bar title="药品库" left-text="<" @click-left="$router.go(-1)" />
  <van-index-bar :index-list="indexList">
    <div v-for="(v,i) in indexList" :key="i">
      <van-index-anchor :index='v'></van-index-anchor>
      <van-cell v-for="(item,index) in list[i]" :key="index" :title="item" />
    </div>

  </van-index-bar>
</div>
</template>

<script>
import {
  drugList
} from '@/mock/index'
export default {
  data() {
    return {
      indexList: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'W', 'X', 'Y', 'Z'],
      list: drugList
    };
  },
}
</script>

<style>

</style>
